package main

import "fmt"

var this_dict [][]map[int]int = make([][]map[int]int, 100)

func getIndex(num int) int {
	return num % 10
}

func set(key int, val int) {
	if this_dict[getIndex(key)] != nil {

		for _, vv := range this_dict[getIndex(key)] {
			if _, ok1 := vv[key]; ok1 {
				vv[key] = val
				return
			}
		}
		this_dict[getIndex(key)] = append(this_dict[getIndex(key)], map[int]int{key: val})
	} else {
		this_dict[getIndex(key)] = append(this_dict[getIndex(key)], map[int]int{key: val})
	}

}

func get(key int) interface{} {
	if this_dict[getIndex(key)] != nil {
		for _, vv := range this_dict[getIndex(key)] {
			if val, ok1 := vv[key]; ok1 {
				return val
			}
		}
		return nil
	} else {
		return nil
	}
}
func main() {
	set(11, 12)
	fmt.Println(get(11))
	set(11, 13)
	fmt.Println(get(11))
	set(1, 14)
	fmt.Println(get(11))
	fmt.Println(this_dict)
	fmt.Println(get(1))
}
